/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.service;

import java.util.List;
import java.util.Map;

import com.sigmatrix.h5.dto.WarehouseData;
import com.sigmatrix.h5.exception.ServiceException;
import com.sigmatrix.h5.request.Request;
import com.sigmatrix.h5.response.Response;
import com.sigmatrix.h5.service.common.BaseService;
import com.sigmatrix.h5.web.vo.WarehouseVo;

/**
 *@ClassName: WarehouseService
 *@Description: 仓库业务层接口
 *@author youjun
 *@date 2017-06-24 17:31:11
 */
public interface WarehouseService extends BaseService<WarehouseData> {

	/**
	 *@Title: findById
	 *@Description: 根据主键查找仓库
	 *@return WarehouseData
	 *@author youjun
	 *@date 2017-06-24 17:31:11
	 *@param id
	 *@param enterpriseCode
	 *@return
	 * @throws ServiceException 
	 */
	WarehouseData findById(Integer id, String enterpriseCode) throws ServiceException;


	/**
	 *@Title: findListByCondition
	 *@Description: 根据条件查询仓库列表
	 *@return List<WarehouseData>
	 *@author youjun
	 *@date 2017-06-24 17:31:11
	 *@param warehouseVo
	 *@return
	 *@throws ServiceException
	 */
	List<WarehouseData> findListByCondition(WarehouseVo warehouseVo) throws ServiceException;


	/**
	 *@Title: getAllWarehouseMap
	 *@Description: 获得所有的仓库map
	 *@return Map<Integer,WarehouseData>
	 *@author youjun
	 *@date 2017年6月25日 下午3:10:28
	 *@return
	 *@throws ServiceException
	 */
	Map<Integer, WarehouseData> getAllWarehouseMap(final String enterpriseCode) throws ServiceException;


	/**
	 *@Title: getAllWarehouseList
	 *@Description: 获得所有的仓库列表
	 *@return List<WarehouseData>
	 *@author youjun
	 *@date 2017年6月25日 下午3:10:33
	 *@return
	 *@throws ServiceException
	 */
	List<WarehouseData> getAllWarehouseList(final String enterpriseCode) throws ServiceException;


	/**
	 *@Title: getWarehouseFromMap
	 *@Description: 从map中获取仓库信息,若无将从数据库中查询并放入map中
	 *@return WarehouseData
	 *@author youjun
	 *@date 2017年6月25日 下午3:29:46
	 *@param warehouseMap
	 *@param warehouseId
	 *@param enterpriseCode
	 *@return
	 *@throws ServiceException
	 */
	WarehouseData getWarehouseFromMap(Map<Integer, WarehouseData> warehouseMap, Integer warehouseId, final String enterpriseCode)
			throws ServiceException;


	/**
	 *@Title: syncList
	 *@Description: TODO()
	 *@return Response
	 *@author youjun
	 *@date 2017年6月27日 上午10:41:08
	 *@param warehouseVo
	 *@return
	 */
	Response syncList(WarehouseVo warehouseVo) throws ServiceException;
	
	/**
	 *@Title: syncList
	 *@Description: TODO()
	 *@return Response
	 *@author 
	 *@date 2017年9月8日 下午4:31:20
	 *@param reques
	 *@return
	 *@throws ServiceException
	 */
	Response syncList(final Request reques) throws ServiceException;
	
}
